package com.check.ui;

import com.check.bean.UiList;
import com.check.utils.LoadFxmlUtils;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.stage.Stage;

/**
 * @author zyt
 */
public class Main{

    private UiList uiList = UiList.getUIList();
    private Stage stage;

    public Main(){
        if(uiList.getMain()==null){
            uiList.setMain(this);
        }
    }

    public void start(Stage primaryStage) throws Exception{
        this.setStage(primaryStage);
        String path = "/fxml/OneTableCheck.fxml";
        Parent root = LoadFxmlUtils.getParent(path);
        // 设置窗口标题
        primaryStage.setTitle("数据质检工具");
        // 禁止更改大小,默认true可以更改
        primaryStage.setResizable(false);

        primaryStage.setScene(new Scene(root));
        primaryStage.show();
    }
    public Stage getStage() {
        return stage;
    }
    public void setStage(Stage stage) {
        this.stage = stage;
    }
}
